var auth=({
	fillPhone : function (){
		$("#phone").val(phone);
//		$("#phone").attr("disabled","disabled");
		$("#yzm").hide();
		$("#checkCaptchaBtn").attr("disabled", false).css("background", "#0894ec");
	},
	toAuth : function (){
		var phone=$("#phone").val();
		var name=$("#userName").val();
		var sex=sex_;  
		var jobName=$("#jobName").val();
		var idCard=$("#cardId").val();
		$$.showPreloader("正在保存...");
		$('#form1').ajaxSubmit(  
		        {
		            url: '../bills/addIdCard',
		            type: 'post',
		            dataType: 'json',
		            beforeSubmit: function () {},
		            success: function (data) {
		                if(data.success){
		                	$.ajax({
		            	 		url: "../auth/toAuth.do",
		                       	data:{
		                       		"phone":phone,
		            				"name":name,
		            				"sex":sex,
		            				"jobName":jobName,
		            				"idCard":idCard
		                       	},
		            			type : "POST",
		            			dataType : 'json',
		            			cache : false,
		            			success : function(ret){
		            				$$.hidePreloader();
		                        	if(ret.success){
		                        		$("#step03, #step05").hide();
		            					$("#step04").show();
		                        		
		            				}else{
		            					$$.toast('认证失败');	
		            				}
		            			},
		            			error: function(){
		            				$$.hidePreloader();
		            				$$.toast('创建失败');	
		            			}
		            		});
		                }
		            },
		            error : function (err){
		            	alert("上传失败");
		            	$$.hidePreloader();
		            },
		            clearForm: false,//禁止清楚表单
		            resetForm: false //禁止重置表单
		        });
	 	
		
	}
})